lst = [12,[233,234],"12s",(23,6,[120])]
def flatten(n):
    ret = []
    for i in n:
        if isinstance(i,(list,tuple)):
            ret.extend(flatten(i))
        elif isinstance(i,int):
            ret.append(i)
    return ret
ret = flatten(lst)
print(ret)